<template>
  <div class="page">用户详情页</div>
</template>

<script type="text/ecmascript-6">
export default {
  //能够获取上下文的信息，做一些判断
  
  async asyncData({ query, error }) {
    if (query.id) {
      return { user: { name: "tom" } };
    }
    error({ status: 400, message: "请传递用户id"});
  },
  data() {
    return {};
  },
  components: {}
};
</script>

<style scoped>
</style>
